<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            width: 100%;
        }

        .box {
            position: absolute;
            left: 0;
            top: 0;
            width: 200px;
            height: 200px;
            background-color: pink;
        }

        .shadow {
            display: none;
            position: absolute;
            left: 0;
            top: 0;
            height: 300px;
            width: 150px;
            background-color: green;
            z-index: 999;
        }
    </style>
</head>

<body>
    <a href="javascript:;" class="box"></a>
    <div class="shadow"></div>

    <script type="text/javascript" src="../js/utils.js"></script>
    <script type="text/javascript" src="../js/index.js"></script>
    <script type="text/javascript">
        var olink = document.getElementsByClassName('box')[0],
            shadow = document.getElementsByClassName('shadow')[0];
        dragNclick(olink, shadow, function () {
            window.open('https://www.bilibili.com/');
        });
    </script>
</body>

</html>